package com.zch.socket.common;

import org.tio.core.intf.Packet;

public class CommonPacket<T> extends Packet {
    private static final long serialVersionUID = -172060606924066412L;
    public static final int HEADER_LENGHT = 4;//消息头的长度
    public static final String CHARSET = "utf-8";
    private T t;
    private byte[] body;

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
        //body=ByteUtils.ObjectToByte(t);
    }

    public byte[] getBody() {
        return body;
    }

    public void setBody(byte[] body) {
        this.body = body;
    }
}
